package com.example.myapplication;

import android.widget.ImageView;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;


public class ImageViewActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_image_view);
        ImageView image = findViewById(R.id.image2);
        image.setImageResource(R.drawable.microsoft_log);
        //设置布局
        ImageView image4 = findViewById(R.id.image4);
        image4.setScaleType(ImageView.ScaleType.CENTER);
    }
}
